home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_400
/
429_01
/
chess12
/
player.hpp
< prev
next >
Wrap
C/C++ Source or Header
|
1994-03-30
|
465b
|
25 lines
#if !defined(PLAYER_HPP)
#define PLAYER_HPP
#include "chess.hpp"
enum GAMESTATUS { GAMECONTINUE, GAMEOVER };
// abstract base class for player. a player performs a move
// when the play member is invoked.
class PLAYER
{
private:
const PIECECOLOR color;
public:
PLAYER(PIECECOLOR c) : color(c) { }
PIECECOLOR whatColor(void) const { return(color); }
virtual GAMESTATUS play(BOARD &board) const = 0;
};
#endif